package com.firstresponder.util;

public enum SmsConstants {
	ADDRESS("ADD"), NO_NUMBER("NO"), YES_NUMBER("YES"),
	LOCATION_TYPE("LOC"), LATITUDE("LAT"), LONGITUDE("LNG"), DEPT_ID("DI"),
	LOCATION_KEY("LK"), LOCATION_PRIORITY("LP"), LOCATION_NAME("LN"), HEADER("FR"), 
	STATUS("STA"), FOOTER("FR"), CANCEL("CAN"), SEPERATOR("#");
	
	private String smsAbbreviation;
	
	SmsConstants(String smsAbbreviation) {
		this.smsAbbreviation = smsAbbreviation;
	}
	
	public String asSmsAbbreviation() {
		return smsAbbreviation;
	}
	
	public static SmsConstants smsAbbreviationToConstant(String smsAbbreviation) {
		for (SmsConstants constant : SmsConstants.values()) {
			if (constant.asSmsAbbreviation().equals(smsAbbreviation)) {
				return constant;
			}
		}
		
		return null;
	}
}
